build #69927
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: Auto Deploy | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
repository_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: '${{ secrets.GH_TOKEN }}' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: package.json | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Upload Artifact | |
if: success() && github.ref == 'refs/heads/master' | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: build/ | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
name: Deploy | |
needs: build | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |