-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28287b4
commit 15a0ba2
Showing
2 changed files
with
24 additions
and
11 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 |
---|---|---|
|
@@ -5,10 +5,16 @@ on: | |
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
build-and-deploy: | ||
|
@@ -36,17 +42,24 @@ jobs: | |
DEPLOY_PRIME_URL: https://rohit-gohri.github.io/ | ||
DEPLOY_BASE_URL: /redocusaurus/ | ||
|
||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-[email protected] | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
folder: website/build | ||
clean: true # Automatically remove deleted files from the deploy branch | ||
git-config-email: [email protected] | ||
git-config-name: Drone User | ||
path: website/build | ||
if: ${{ github.event_name == 'push' }} | ||
|
||
deploy-pages: | ||
if: ${{ github.event_name == 'push' }} | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build-and-deploy | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
|
||
publish-test: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name != 'push' && github.head_ref != 'changeset-release/main' }} | ||
|
@@ -85,7 +98,7 @@ jobs: | |
|
||
- name: Add comment | ||
if: ${{ env.publish == 'yes' }} | ||
uses: thollander/actions-comment-pull-request@v1 | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
message: | | ||
This pull request is automatically built and it is testable by installing [redocusaurus@v${{ env.package_version }}](https://www.npmjs.com/package/redocusaurus/v/${{ env.package_version }}). | ||
|
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