Update publish.yaml #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
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [ | |
ubuntu-latest, | |
# windows-latest, | |
# macos-latest, | |
] | |
concurrency: | |
group: ${{github.workflow}}-${{github.ref}} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Add PNPM | |
uses: pnpm/action-setup@v3 | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Build App | |
run: pnpm build | |
- name: Upload Output | |
uses: actions/upload-artifact@v2 | |
with: | |
name: output | |
path: output | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
concurrency: ci-${{github.ref}} | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{steps.gh_pages_deploy.outputs.page_url}} | |
steps: | |
- name: Download Output | |
uses: actions/download-artifact@v2 | |
with: | |
name: output | |
- name: Deploy to GitHub Pages | |
id: gh_pages_deploy | |
uses: actions/deploy-pages@v2 | |
with: | |
artifact_name: output | |
# - name: Deploy Github Pages | |
# uses: peaceiris/actions-gh-pages@v4 | |
# if: github.ref == 'refs/heads/master' | |
# with: | |
# github_token: ${{secrets.GITHUB_TOKEN}} | |
# user_name: 'EXO[bot]' | |
# user_email: 'exo[bot]@users.noreply.github.com' | |
# publish_dir: ./output | |
# cname: exo.ult.dev |