From f5b2965b44c735fda3a04c4210dffb08da589f41 Mon Sep 17 00:00:00 2001 From: Erin O'Connell Date: Tue, 21 Apr 2026 14:26:51 -0600 Subject: [PATCH] (*) support site will not be hosted at system76.com/support . Upload assets to s3 instead oif github pages --- .../workflows/{deploy.yml => deploy-prod.yml} | 22 +++----- .github/workflows/deploy-staging.yml | 53 +++++++++++++++++++ nuxt.config.js | 6 ++- 3 files changed, 64 insertions(+), 17 deletions(-) rename .github/workflows/{deploy.yml => deploy-prod.yml} (72%) create mode 100644 .github/workflows/deploy-staging.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy-prod.yml similarity index 72% rename from .github/workflows/deploy.yml rename to .github/workflows/deploy-prod.yml index 0915f5deae..822d0cf473 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy-prod.yml @@ -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 }} diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml new file mode 100644 index 0000000000..b5fe96cdb2 --- /dev/null +++ b/.github/workflows/deploy-staging.yml @@ -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 }} diff --git a/nuxt.config.js b/nuxt.config.js index 9f081e22a1..9cd7282850 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -5,6 +5,10 @@ import linkFixes from './modules/link-fixes' export default async () => ({ target: 'static', + router: { + base: '/support/' + }, + components: true, content: { @@ -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' },