Deloy GitHub Pages #30
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: 'Deloy GitHub Pages' | |
on: | |
workflow_run: | |
workflows: ["Build (Dev)"] | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
deloy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- name: "Update Pages File" | |
run: | | |
export RUN_ID=$(cat run_id.txt) | |
curl -o artifacts.json https://api.github.com/repos/ITCraftDevelopmentTeam/OneDisc/actions/runs/$RUN_ID/artifacts | |
- name: Remove cached files | |
run: | | |
mv beta.json version.json | |
rm run_id.txt | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: . |