Skip to content

Daily Site Update #1405

Daily Site Update

Daily Site Update #1405

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Daily Site Update
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
push:
branches: master
pull_request:
branches: master
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
update-site:
name: Update projects page
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repo
uses: actions/[email protected]
with:
ref: 'gh-pages'
- name: Setuping Node latest version
uses: actions/[email protected]
with:
node-version: 'lts/*'
check-latest: true
- name: Download update script
run: sudo wget -q -P ./scripts https://raw.githubusercontent.com/Jerit3787/projects/master/scripts/main.sh
- name: Run update script
run: sudo chmod +x ./scripts/main.sh && sudo ./scripts/main.sh
- name: Prepare commit title
id: date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
- name: Add & Commit to repo
uses: EndBug/[email protected]
with:
add: '["*.html --force", "*.css --force"]'
cwd: './'
default_author: github_actions
message: ${{ steps.date.outputs.date }}
tag: ${{ steps.date.outputs.date }}