# Terminal
git checkout -b ingress
git rebase ingress
asdf local ruby 3.3.1
bin/rails s
# .github/workflows/ingress.yml
name: Update Writebook Source
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
with:
ref: ingress
- name: Remove Old Files
run: |
shopt -s extglob
rm -rf !(|.git|.|..)
- name: Download and Unzip Source
run: |
curl -o download.zip https://auth.once.com/download/${{ secrets.PURCHASE_TOKEN }}
unzip -o download.zip
rm download.zip
- name: Configure Git
run: |
git config --local user.email "github-actions@users.noreply.github.com"
git config --local user.name "github-actions"
- name: Commit and Push Changes
run: |
git add .
git diff --staged --quiet || git commit -m "Update source files $(date +%F)"
git push origin ingress
# .gitignore
log/*.log
storage/db/*
storage/files/*
tmp/local_secret.txt
tmp/restart.txt