Skip to content

Commit

Permalink
Add deploy .yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Iryna-Vyshniak committed Jul 14, 2024
1 parent 0ef937a commit b1d2112
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and deploy to GitHub Pages

on:
push:
branches: [main]
schedule:
- cron: '0 0 */5 * *'

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16

- name: Install dependencies 🔧
run: npm install

- name: Lint code 🧹
run: npm run lint:js

- name: Build project 🛠️
run: npm run web

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
branch: gh-pages
folder: web-build

commit:
name: Commit changes
runs-on: ubuntu-latest
if: github.event_name == 'schedule'

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Make a change to update_log.txt
run: |
echo "Update on $(date)" > update_log.txt
- name: Configure Git user
run: |
git config --global user.name 'Iryna-Vyshniak'
git config --global user.email 'iryna.vyshniak@gmail.com'
- name: Commit changes
run: |
git add update_log.txt
git commit -m "Update log"
git push
Empty file added update_log.txt
Empty file.

0 comments on commit b1d2112

Please sign in to comment.