-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:derbyjs/racer into update-jsdoc
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 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,62 @@ | ||
# Based on https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml | ||
name: Build typedoc docs site, Deploy to Pages when on default branch | ||
|
||
env: | ||
DOCS_DIR: docs | ||
|
||
on: | ||
# Run workflow on any branch push. | ||
# Conditionals are used to only trigger deploy on the default branch. | ||
push: | ||
# Uncomment to only run on specific branch pushes. | ||
# branches: ["master"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment per branch, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow the deployments to complete. | ||
concurrency: | ||
group: "pages-${{ github.ref }}" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v4 | ||
- name: Build with Typedoc | ||
run: npm i && npm run docs | ||
- name: Upload artifact | ||
if: github.ref == 'refs/heads/master' # Only upload when on default branch | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "./${{ env.DOCS_DIR }}" | ||
|
||
# Deployment job | ||
deploy: | ||
if: github.ref == 'refs/heads/master' # Only deploy when on default branch | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |