Skip to content

Commit

Permalink
config: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
LVCarnevalli committed Jul 12, 2024
1 parent 9cab9a8 commit 84ed6e4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
38 changes: 29 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ on:

jobs:
build:
name: Deploy to GitHub Pages

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -25,7 +19,33 @@ jobs:
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci
- name: Build and deploy website
run: npm run deploy
- name: Build website
run: npm run build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

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

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci
- name: Test build website
Expand Down

0 comments on commit 84ed6e4

Please sign in to comment.