Deploy to database branch #139
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to database branch | |
on: | |
push: | |
branches: [ main ] | |
schedule: | |
- cron: "0 22 * * *" # scheduled at 06:00 (UTC+8) everyday | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js 12.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- name: install dependencies | |
run: | | |
npm install | |
- name: build database | |
run: | | |
git clone https://github.com/openGiraffes/openGiraffes-store-db.git -b apps db/ | |
node . | |
cd db | |
- name: Log files | |
run: ls db/public | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} | |
REPOSITORY_NAME: openGiraffes/openGiraffes-store-db | |
BRANCH: database # The branch the action should deploy to. | |
FOLDER: db/public # The folder the action should deploy. | |
CLEAN: true # Automatically remove deleted files from the deploy branch |