-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (68 loc) · 1.86 KB
/
main.yml
File metadata and controls
69 lines (68 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Minify, Package, and Deploy to hosting
on:
push:
branches:
- main
release:
branch: main
types: [published]
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# build and minify
build:
runs-on: ubuntu-latest
steps:
- name: Checkout from main
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: add version numbers (commit hash)
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "[-version-number-]"
replace: "${{github.sha}}"
exclude: "**/*.yml"
regex: false
- name: Minify
uses: anthonyftwang/minify-action@v1.0.1
- name: commit to deployment
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: minify and package commit hash ${{github.sha}} from main for deployment
branch: deployed
skip_checkout: true
push_options: "--force"
commit_user_name: Sander Vonk
commit_user_email: sandervonk@users.noreply.github.com
# # package to site
# package:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Build with Jekyll
# uses: actions/jekyll-build-pages@v1
# with:
# source: ./
# destination: ./_site
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v1
# # deploy site
# deploy:
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-latest
# needs: package
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v1