Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions .github/workflows/deploy.yml → .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,9 @@ jobs:
with:
path: dist/

Deploy:
needs: Build
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: Support
url: ${{ steps.deployment.outputs.page_url }}

steps:
- id: deployment
name: Deploy
uses: actions/deploy-pages@v4
- name: Deploy
run: aws s3 sync ./dist s3://${{ secrets.PRODUCTION_AWS_S3_BUCKET }}/support --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.PRODUCTION_AWS_REGION }}
53 changes: 53 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Deploy

on:
push:
branches:
- staging

jobs:
Build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
cache: npm
node-version-file: .tool-versions

- id: cache
name: Cache
uses: actions/cache@v5
with:
path: ./node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

- if: steps.cache.outputs.cache-hit != 'true'
name: Install
run: npm ci

- name: Build
run: npm run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_ENV: production

- name: Debug
run: ls -la dist/_nuxt/content 2>&1 || true

- name: Upload
uses: actions/upload-pages-artifact@v3
with:
path: dist/

- name: Deploy
run: aws s3 sync ./dist s3://${{ secrets.STAGING_AWS_S3_BUCKET }}/support --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.STAGING_AWS_REGION }}
6 changes: 5 additions & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import linkFixes from './modules/link-fixes'
export default async () => ({
target: 'static',

router: {
base: '/support/'
},

components: true,

content: {
Expand Down Expand Up @@ -33,7 +37,7 @@ export default async () => ({
{ charset: 'utf-8' },

{ name: 'viewport', content: 'width=device-width, initial-scale=1' },

{ hid: 'og:url', property: 'og:url', content: 'https://system76.com/support' },
{ hid: 'description', name: 'description', content: 'Official System76 Support and useful documentation' },
{ hid: 'og:title', property: 'og:title', content: 'System76 Support' },
{ hid: 'og:description', property: 'og:description', content: 'Official System76 Support and useful documentation' },
Expand Down
Loading