Skip to content

Commit

Permalink
Merge branch 'development' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsowa committed Nov 21, 2023
2 parents c9c1c6c + 766c497 commit 7c01bfd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
44 changes: 26 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
name: Deploy
name: Deploy to Github Pages

on:
push:
branches:
- production
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.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
gh-pages:
name: GitHub Pages
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -23,19 +32,18 @@ jobs:
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "build/"

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
id: deployment
uses: actions/deploy-pages@v2
6 changes: 3 additions & 3 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const config: Config = {
url: 'https://fictionlab.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
baseUrl: '/docs/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
Expand All @@ -37,7 +37,7 @@ const config: Config = {
docs: {
sidebarPath: './sidebars.ts',
editUrl:
'https://github.com/fictionlab/fictionlab.github.io',
'https://github.com/fictionlab/docs/edit/development/',
},
theme: {
customCss: './src/css/custom.css',
Expand All @@ -61,7 +61,7 @@ const config: Config = {
label: 'Tutorial',
},
{
href: 'https://github.com/fictionlab/fictionlab.github.io',
href: 'https://github.com/fictionlab/docs',
label: 'GitHub',
position: 'right',
},
Expand Down

0 comments on commit 7c01bfd

Please sign in to comment.