Skip to content

Commit 8829149

Browse files
committed
ci: add github pages deploy job
1 parent b3369ef commit 8829149

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,33 @@ jobs:
5555
- name: Build ruby.wasm
5656
if: steps.cache-ruby-wasm-module.outputs.cache-hit != 'true'
5757
run: |
58-
sudo apt-get update
59-
sudo apt-get -yqq install zlib1g-dev
6058
bundle exec rbwasm build -o src/ruby.wasm --ruby-version 3.2
6159
- name: Build web app
6260
run: |
6361
yarn install
6462
yarn build
63+
- name: Push to Github Pages
64+
if: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
65+
uses: actions/upload-pages-artifact@v1
66+
with:
67+
path: './dist'
68+
69+
deploy:
70+
needs: build
71+
if: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
72+
73+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
74+
permissions:
75+
contents: read
76+
pages: write
77+
id-token: write
78+
79+
# Allow one concurrent deployment
80+
concurrency:
81+
group: "pages"
82+
cancel-in-progress: true
83+
84+
runs-on: ubuntu-latest
85+
steps:
86+
- name: Deploy to GitHub Pages
87+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)