Skip to content

Commit

Permalink
Test pages deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
BenBowers committed Mar 13, 2024
1 parent 52d734a commit d0a704e
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 4 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/deploy-to-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
push:
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
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:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install
run: pnpm install
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build
run: pnpm turbo run build --filter=@hexy/docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/build'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
7 changes: 4 additions & 3 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ const config = {
},
title: "I'm bringing Hexy Back",
tagline: "Those other frameworks don't know how to act",
url: 'https://journeyone.com.au',
url: 'https://benbowers.github.io',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
// organizationName: 'journeyone', // Usually your GitHub org/user name.
// projectName: 'hexy-back-workshop', // Usually your repo name.
organizationName: 'BenBowers', // Usually your GitHub org/user name.
projectName: 'hexy-back-workshop', // Usually your repo name.
trailingSlash: false,

presets: [
[
Expand Down
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"lint",
"test-ci"
]
}
},
"build": {}
}
}

0 comments on commit d0a704e

Please sign in to comment.