Skip to content

Commit f5b2965

Browse files
committed
(*) support site will not be hosted at system76.com/support . Upload assets to s3 instead oif github pages
1 parent c5a4653 commit f5b2965

3 files changed

Lines changed: 64 additions & 17 deletions

File tree

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,9 @@ jobs:
4545
with:
4646
path: dist/
4747

48-
Deploy:
49-
needs: Build
50-
runs-on: ubuntu-latest
51-
52-
permissions:
53-
pages: write
54-
id-token: write
55-
56-
environment:
57-
name: Support
58-
url: ${{ steps.deployment.outputs.page_url }}
59-
60-
steps:
61-
- id: deployment
62-
name: Deploy
63-
uses: actions/deploy-pages@v4
48+
- name: Deploy
49+
run: aws s3 sync ./dist s3://${{ secrets.PRODUCTION_AWS_S3_BUCKET }}/support --delete
50+
env:
51+
AWS_ACCESS_KEY_ID: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }}
52+
AWS_SECRET_ACCESS_KEY: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }}
53+
AWS_DEFAULT_REGION: ${{ secrets.PRODUCTION_AWS_REGION }}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: Deploy
3+
4+
on:
5+
push:
6+
branches:
7+
- staging
8+
9+
jobs:
10+
Build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v6
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v6
19+
with:
20+
cache: npm
21+
node-version-file: .tool-versions
22+
23+
- id: cache
24+
name: Cache
25+
uses: actions/cache@v5
26+
with:
27+
path: ./node_modules
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29+
30+
- if: steps.cache.outputs.cache-hit != 'true'
31+
name: Install
32+
run: npm ci
33+
34+
- name: Build
35+
run: npm run build
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
NODE_ENV: production
39+
40+
- name: Debug
41+
run: ls -la dist/_nuxt/content 2>&1 || true
42+
43+
- name: Upload
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: dist/
47+
48+
- name: Deploy
49+
run: aws s3 sync ./dist s3://${{ secrets.STAGING_AWS_S3_BUCKET }}/support --delete
50+
env:
51+
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}
52+
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}
53+
AWS_DEFAULT_REGION: ${{ secrets.STAGING_AWS_REGION }}

nuxt.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import linkFixes from './modules/link-fixes'
55
export default async () => ({
66
target: 'static',
77

8+
router: {
9+
base: '/support/'
10+
},
11+
812
components: true,
913

1014
content: {
@@ -33,7 +37,7 @@ export default async () => ({
3337
{ charset: 'utf-8' },
3438

3539
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
36-
40+
{ hid: 'og:url', property: 'og:url', content: 'https://system76.com/support' },
3741
{ hid: 'description', name: 'description', content: 'Official System76 Support and useful documentation' },
3842
{ hid: 'og:title', property: 'og:title', content: 'System76 Support' },
3943
{ hid: 'og:description', property: 'og:description', content: 'Official System76 Support and useful documentation' },

0 commit comments

Comments
 (0)