Package and Deploy #419
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: Package and Deploy | |
on: | |
workflow_run: | |
workflows: [ "Vite Build" ] | |
types: | |
- completed | |
workflow_dispatch: | |
repository_dispatch: | |
jobs: | |
package: | |
name: Package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- run: yarn install | |
env: | |
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true" | |
- name: Download built web artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: build.yml | |
name: dist | |
path: dist | |
- name: Checkout data repo's github pages | |
uses: actions/checkout@v3 | |
with: | |
repository: "one-among-us/data" | |
ref: "gh-pages" | |
path: "data-repo" | |
- name: Package | |
uses: one-among-us/puppeteer-headful@20 | |
with: | |
args: yarn gen-meta | |
- name: Publish artifact code | |
uses: actions/upload-artifact@v3 | |
with: | |
name: packaged | |
path: dist | |
- name: Deploy to GitHub branch | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: dist | |
- name: Deploy 🚀 | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: one-among-us | |
directory: dist | |