-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Now that hosting is in vercel, we can remove redundant github…
… pages actions"
- Loading branch information
1 parent
9a27050
commit f679ced
Showing
2 changed files
with
51 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,39 @@ | ||
name: Publish docs to GitHub Pages | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
destination_dir: | ||
type: string | ||
ref: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
publish-docs-to-gh-pages: | ||
name: Publish docs to GitHub Pages | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- name: Install npm dependencies | ||
run: yarn --immutable | ||
- name: Run build script | ||
run: DEST="/${{ inputs.destination_dir }}" yarn build | ||
- name: Deploy to `${{ inputs.destination_dir }}` directory of `gh-pages` branch | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build | ||
destination_dir: ${{ inputs.destination_dir }} | ||
keep_files: true | ||
|
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,12 @@ | ||
name: Publish main branch docs to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: main | ||
|
||
jobs: | ||
publish-to-gh-pages: | ||
name: Publish docs to `./` directory of `gh-pages` branch | ||
permissions: | ||
contents: write | ||
uses: ./.github/workflows/publish-docs.yml |