Skip to content

Commit

Permalink
Update GitHub deployment method in jsDoc workflow
Browse files Browse the repository at this point in the history
Configuration in jsDoc.yml was adjusted. Instead of using the deploy_key for authentication during deployment, the process now utilizes built-in GITHUB_TOKEN for better security and simplicity.
  • Loading branch information
erikyo committed Dec 2, 2023
1 parent 12706c1 commit a388102
Showing 1 changed file with 44 additions and 27 deletions.
71 changes: 44 additions & 27 deletions .github/workflows/jsDoc.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
permissions:
contents: read
pages: write
id-token: write

# Simple workflow for deploying static content to GitHub Pages
name: JSDoc Action

on:
Expand All @@ -15,29 +11,50 @@ on:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

# Single deploy job since we're just deploying
deploy:
name: Deploy
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read
pages: write
id-token: write

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build
uses: andstor/jsdoc-action@v1
with:
source_dir: ./lib
recurse: true
output_dir: ./out
config_file: jsdoc.json
front_page: readme.md

- name: Checkout code
uses: actions/checkout@v4

- name: Build
uses: andstor/jsdoc-action@v1
with:
source_dir: ./lib
recurse: true
output_dir: ./out
config_file: jsdoc.json
front_page: readme.md

- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit a388102

Please sign in to comment.