Merge pull request #59 from 0xSpaceShard/develop #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Docusaurus to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: [self-hosted, '${{ vars.RUNNER }}'] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install and Build | |
env: | |
EXCLUDE_FILES: ${{ vars.EXCLUDE_FILES_MAIN }} | |
run: | | |
npm install | |
npm run build | |
- name: Setup CNAME | |
run: echo "${{ vars.CNAME }}" > build/CNAME | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build |