Skip to content

Merge branch 'alpha-0.2' into env/dev #80

Merge branch 'alpha-0.2' into env/dev

Merge branch 'alpha-0.2' into env/dev #80

Workflow file for this run

on:
push:
branches:
- env/dev
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
GCP_KEY_PATH: "/tmp/key.json"
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Run actionlint
shell: bash
run: |
set -ex
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color
- name: setup node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: nuxt setup
run: echo "${{ secrets.DEV_ENV }}" > .env
working-directory: ./web
- name: nuxt generate
run: |
yarn
yarn generate
working-directory: ./web
- name: copy files
run: |
rm -rf app/dist
cp -r web/dist app
working-directory: ./
- name: firebase setup
run: |
npm install -g firebase-tools
npm install
working-directory: ./app/functions
# deploy setup
- name: gcp_key file
run: |
set -ex
echo "${{ secrets.DEV_GCLOUD_SERVICE_KEY }}" | base64 -d > ${{ env.GCP_KEY_PATH }}
- uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.DEV_GCLOUD_SERVICE_KEY }}'
- name: 'Use gcloud CLI'
run: 'gcloud auth list --filter=status:ACTIVE --format="value(account)"'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
with:
install_components: ''
project_id: 'd-shrine-dev'
- name: firebase deploy
run: |
firebase deploy --project d-shrine-dev
working-directory: ./app