Skip to content

Update and Deploy #1018

Update and Deploy

Update and Deploy #1018

Workflow file for this run

name: Update and Deploy
on:
schedule:
# Once a day at 8 AM
- cron: 0 8 * * *
workflow_dispatch: {}
jobs:
iroh:
name: Update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: npm install
- name: Build blog
run: bundle exec ruby bin/blog
- name: Commit Blog Changes and deploy
run: |
if [ ! -z "$(git status --porcelain)" ]; then
echo "Setting Config for Git"
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
bin/deploy "${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}" "${{ github.repository }}"
bin/commit.sh "Add new changes for the blog" \
"${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}" \
"${{ github.repository }}" \
${{ github.ref }} \
"data/blog.json"
fi