Skip to content

fix: 🐛 здщп #377

fix: 🐛 здщп

fix: 🐛 здщп #377

Workflow file for this run

name: CI/CD with Docker
on:
push:
branches: [ react ]
env:
TAG_NAME: ${{ github.sha }}
jobs:
publish:
name: Publish to Github Pages
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag lojban:latest
# run: docker build . --file Dockerfile --tag lojban:${{ env.TAG_NAME }}
- name: Run Docker container
uses: kohlerdominik/docker-run-action@v1
with:
run: npm install && npx playwright install chromium && npx playwright install-deps && npm run cicd
image: lojban:latest
environment: |
GOOGLE_LOJBAN_CORPUS_DOC_ID=${{ secrets.GOOGLE_LOJBAN_CORPUS_DOC_ID }}
GOOGLE_READONLY_API_KEY=${{ secrets.GOOGLE_READONLY_API_KEY }}
# image: lojban:${{ env.TAG_NAME }}
volumes: |
/output:/app/src/out1
${{ github.workspace }}/data/config:/app/src/config \
${{ github.workspace }}/data/pages:/app/src/md_pages \
${{ github.workspace }}/data/assets:/app/src/public/assets \
${{ github.workspace }}/data/DNS:/app/service/DNS \
${{ github.workspace }}/src:/app/src
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: output-files
path: /output/
- name: Cleanup
uses: AutoModality/action-clean@v1
- name: Checkout branch
uses: actions/checkout@v2
with:
ref: gh-pages
- name: Clean up the current branch
run: |
git rm -rf . 2>/dev/null
git clean -df
rm -rf ./*
# - name: Download to branch
# uses: dawidd6/action-download-artifact@v2
# with:
# name: output-files
- name: Download to branch
uses: actions/download-artifact@v3
with:
name: output-files
path: ${{ github.workspace }}
- name: Commit & push to branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
# Optional. Commit message for the created commit.
# Defaults to "Apply automatic changes"
commit_message: Deploy from `react` branch
# Optional. Local and remote branch name where commit is going to be pushed
# to. Defaults to the current branch.
# You might need to set `create_branch: true` if the branch does not exist.
branch: gh-pages
# Optional. Options used by `git-push`.
# See https://git-scm.com/docs/git-push#_options
push_options: '--force'
# Optional. Create given branch name in local and remote repository.
create_branch: true
# delete-artifact
# - uses: geekyeggo/delete-artifact@v2
# with:
# name: output-files