Skip to content

Commit

Permalink
add actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matkat99 committed Jul 10, 2024
1 parent c2c1522 commit 07d837f
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build on push

on:
pull_request:
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ['14.17.6']

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install packages
run: npm ci

- name: Run npm build
run: npm run build
33 changes: 33 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build & Deploy

on:
push:
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ['14.17.6']

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install packages
run: npm ci

- name: Run npm build
run: npm run build:prod

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
# with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
Empty file added .nojekyll
Empty file.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"serve": "npx @11ty/eleventy --serve",
"bench": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy",
"build": "npx @11ty/eleventy",
"build:sass:prod": "sass src/static/scss:public/static/css --style compressed",
"build:eleventy:prod": "ELEVENTY_ENV=production eleventy",
"build:prod": "npm run build:eleventy:prod & npm run build:sass:prod",
"clean": "del-cli _site",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 07d837f

Please sign in to comment.