Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow action to deploy develop to S3 #941

Merged
merged 2 commits into from
Jul 5, 2021
Merged
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
63 changes: 63 additions & 0 deletions .github/workflows/deploy_develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy to the develop live server

on:
push:
branches:
- master

jobs:
api_data:
runs-on: ubuntu-latest

# protect those who work in their fork
if: github.repository == 'qmk/qmk_configurator'

steps:
- uses: actions/checkout@v2

- id: nodeversion
run: echo ::set-output name=NODE::$(cat .nvmrc)

- name: restore Cache
uses: actions/cache@master
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Use Node.js ${{steps.nodeversion.outputs.NODE}}
uses: actions/setup-node@v1
with:
node-version: ${{ steps.nodeversion.outputs.NODE }}

- name: install
run: |
yarn

- name: Lint
run: |
yarn run prettier:check
yarn run prettier:json:check
yarn run lint

- name: Cypress run
uses: cypress-io/github-action@v2
with:
start: yarn serve
wait-on: "http://localhost:8080"

- name: build
run: |
sed -i 's,\(VUE_APP_KEYBOARDS_URL=\).*,\1https://keyboards.develop.qmk.fm,' .env.production
echo VUE_APP_TRAVIS_COMMIT=$GITHUB_SHA >> .env.production
yarn run build

- name: Deploy Develop Configurator
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.CONFIG_SPACE_DEVELOP }}
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com
SOURCE_DIR: "dist"