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
10 changes: 5 additions & 5 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
NODE_ENV: production

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
cname: blog.system76.com
github_token: ${{ secrets.RELEASE_TOKEN }}
publish_dir: ./dist
run: aws s3 sync ./dist s3://${{ secrets.PRODUCTION_AWS_S3_BUCKET }}/blog --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 }}
16 changes: 6 additions & 10 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,9 @@ jobs:
path: 'deploy'
token: ${{ secrets.RELEASE_TOKEN }}

- name: Push build to blog-staging repo
run: |
cp -r dist/* deploy
cd deploy
touch .nojekyll
echo "blog.genesis76.com" > CNAME
echo -e "User-agent: *\nDisallow: /" > robots.txt
git add .
git commit -m 'deploy: ${GITHUB_SHA::8}'
git push
- name: Deploy
run: aws s3 sync ./dist s3://${{ secrets.STAGING_AWS_S3_BUCKET }}/blog --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 }}
8 changes: 6 additions & 2 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ const prismicApiUrl = apiEndpoint
const HOST = process.env.NODE_ENV === 'development'
? 'http://localhost:3000'
: process.env.NODE_ENV === 'staging'
? 'https://blog.genesis76.com'
: 'https://blog.system76.com'
? 'https://genesis76.com/blog'
: 'https://system76.com/blog'

export default {
target: 'static',

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

components: [
'~/components',
{ path: '~/slices', extensions: ['vue'] }
Expand Down
Loading