mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 23:27:09 +00:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Deploy to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Get latest mcdata commit hash
|
|
uses: octokit/request-action@v2.x
|
|
id: get_mcdata_hash
|
|
with:
|
|
route: GET /repos/Arcensoth/mcdata/branches/master
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Get latest vanilla-datapack commit hash
|
|
uses: octokit/request-action@v2.x
|
|
id: get_vanilla_datapack_summary_hash
|
|
with:
|
|
route: GET /repos/SPGoding/vanilla-datapack/branches/summary
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build
|
|
run: |
|
|
npm install
|
|
npm run build -- --env.mcdata_hash='${{ fromJson(steps.get_mcdata_hash.outputs.data).commit.sha }}' --env.vanilla_datapack_summary_hash='${{ fromJson(steps.get_vanilla_datapack_summary_hash.outputs.data).commit.sha }}'
|
|
|
|
- name: Deploy
|
|
uses: JamesIves/github-pages-deploy-action@releases/v3
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
BRANCH: gh-pages
|
|
FOLDER: dist
|