Skip to content

Commit

Permalink
github pages deployment changed from branch to github action
Browse files Browse the repository at this point in the history
  • Loading branch information
CA-MKSingh committed Oct 24, 2024
1 parent 54d45e1 commit 80571ac
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
name: Deploy Docusaurus
name: Deploy static content to Pages

on:
release:
types: [published]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
name: Deploy to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

steps:
- name: Checkout repository
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
Expand All @@ -27,13 +37,14 @@ jobs:
- name: Build website
run: bun run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
publish_dir: ./build
publish_branch: published
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
commit_message: "Deploy website - based on ${{ github.sha }}"
cname: ${{ vars.CNAME }} # Changed from secrets to vars since it's not sensitive
path: "./build" # Upload the Docusaurus build output

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 80571ac

Please sign in to comment.