Add Sleeping (a1.15), fix capitalization of Cleaning (a1.7). #30
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: Build /public and deploy to gh-pages with docker container | |
on: | |
push: | |
branches: | |
- main | |
- gh-pages | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
tags: | |
description: 'Test scenario tags' | |
required: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | |
with: | |
persist-credentials: false | |
- name: remove public and data-dir if already exists | |
run: rm -rf public data | |
- run: mkdir public | |
- run: mkdir data | |
- run: chmod -R 2777 data # user in container is node which won't have write access to public | |
- run: chmod -R 2777 public # user in container is node which won't have write access to public | |
- run: git clone https://github.com/mpilhlt/vocabs-worktime.git data/ | |
- name: make .env.production file | |
run: echo "BASEURL=/vocabs-worktime" > .env.production | |
- name: make .env file | |
run: echo "BASEURL=/vocabs-worktime" > .env | |
- name: build public dir with docker image | |
run: > | |
docker run | |
-v $(pwd)/public:/app/public | |
-v $(pwd)/data:/app/data | |
-v $(pwd)/.env.production:/app/.env.production | |
-v $(pwd)/.env:/app/.env | |
-e GATSBY_RESPOSITORY_URL=https://github.com/skohub-io/skohub-docker-vocabs.git | |
skohub/skohub-vocabs-docker:latest | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |