Skip to content

Commit

Permalink
deploysite
Browse files Browse the repository at this point in the history
  • Loading branch information
jorlopama committed Sep 27, 2024
1 parent 13f596c commit 6ff8354
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/deploy-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy to GitHub Pages

on:
workflow_dispatch:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:

build:
name: Build website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: './website/package-lock.json'

- name: Install dependencies
run: npm ci
working-directory: ./website/

- name: Build website
run: npm run build
working-directory: ./website/

- name: Upload build artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./website/build

deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest

# 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 }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const config = {
url: 'https://microsoft.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
baseUrl: '/EntraSuite-Training',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
Expand Down

0 comments on commit 6ff8354

Please sign in to comment.