Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-gohri committed Jun 21, 2024
1 parent 28287b4 commit 15a0ba2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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' }}
Expand Down Expand Up @@ -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 }}).
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: sleep 60

- name: Wait for Vercel Preview
uses: patrickedqvist/wait-for-vercel-preview@v1.2.0
uses: patrickedqvist/wait-for-vercel-preview@v1.3.1
id: vercel-preview
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 15a0ba2

Please sign in to comment.