Skip to content

chore: update nuxt config for new remote WS #43

chore: update nuxt config for new remote WS

chore: update nuxt config for new remote WS #43

name: Radar External Deployment
on:
push:
branches:
- radar-notion
jobs:
build:
name: Build Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'radar-notion'
- uses: actions/setup-node@v2-beta
with:
node-version: '14'
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm install
run: npm install
- name: nuxt generate
run: npm run generate
env:
BASE_URL: ${{ secrets.BASE_URL }}
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
NUXT_APP_LOCATION: bln
NUXT_APP_API_URL: https://pvo7xic2xk.execute-api.eu-central-1.amazonaws.com
NUXT_APP_SCOPE: public
- name: Upload build
uses: actions/upload-artifact@v2
with:
name: build
path: dist
if-no-files-found: error
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout deploy repo
uses: actions/checkout@v2
with:
repository: TechLabs-Berlin/radar-external.git
token: ${{ secrets.PAT }}
ref: deploy
path: deploy
- name: Download build
uses: actions/download-artifact@v2
with:
name: build
path: build
- name: Copy frontend build to deploy repo
run: |
cp -r deploy/.git deploy/CNAME deploy/README.md build/
- name: Configure git
run: |
git config --global user.email "berlin@techlabs.org"
git config --global user.name "TechLabs Berlin GitHub Workflow"
- name: Commit deploy repo
run: |
git add --all --force .
git commit -m "Add frontend build at $(date +%FT%T%Z)" --allow-empty
working-directory: build
- name: Push deploy repo
run: git push https://${{secrets.PAT}}:x-oauth-basic@github.com/TechLabs-Berlin/radar-external.git
working-directory: build