rebuild-wasm-modules #68
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: Download and Deploy Artifacts | |
on: | |
repository_dispatch: | |
types: [rebuild-wasm-modules] | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Ubuntu -> Build | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Download artifacts | |
if: success() | |
working-directory: ${{github.workspace}} | |
run: | | |
python ./download_artifacts.py -t ${{ secrets.GITHUB_TOKEN }} -d ./BuildArtifacts | |
- name: Deploy to GitHub Pages | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git checkout --orphan gh-pages | |
git rm -rf . | |
cp -r BuildArtifacts/* . | |
rm -rf BuildArtifacts | |
git add . | |
git commit -m "Deploy to GitHub Pages" | |
git push -f origin gh-pages |