-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and deploy to GitHub Pages from GitHub Actions.
Change-Id: I4140492ee8ff367bbe65dd27f7dbd11f6fc7ad6f Reviewed-on: https://code-review.googlesource.com/c/re2/+/62610 Reviewed-by: Alex Chernyakhovsky <[email protected]> Reviewed-by: Paul Wankadia <[email protected]>
- Loading branch information
Showing
2 changed files
with
61 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Pages | ||
on: | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: emscripten/emsdk | ||
# Don't run as root within the container. | ||
# Neither Git nor Bazel appreciates that. | ||
# 1001 is the GitHub Actions runner user. | ||
options: --init --user 1001 | ||
env: | ||
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Bazel fails if the username is unknown. | ||
USER: runner | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# TODO(junyer): Use `v2` whenever a new release is tagged. | ||
- uses: bazelbuild/setup-bazelisk@6244971d4f7ba9aca943c2f3ede2bbd813fcca51 | ||
- run: app/build.sh | ||
shell: bash | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: app/deploy | ||
deploy: | ||
needs: | ||
- build | ||
permissions: | ||
contents: read | ||
# Needed for Pages deployment. | ||
id-token: write | ||
pages: write | ||
environment: github-pages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/deploy-pages@v4 |
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