-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1.31 KB
/
build-and-deploy.yml
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
name: build and deploy
on: push
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: build jekyll
run: bundle exec jekyll build
- name: check links
run: bundle exec htmlproofer --only-4xx --no-enforce-https --ignore-urls "https://kit.fontawesome.com/fe53b9ab7d.js,https://twitter.com/gligoran,https://gorangligorin.disqus.com/count.js,https://www.hostgator.com/help/article/when-and-how-often-will-i-be-paid" ./_site
- uses: cloudflare/pages-action@1
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
projectName: gorangligorin-com
directory: _site
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- uses: crazy-max/[email protected]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
target_branch: history
build_dir: _site
keep_history: true
allow_empty_commit: false
commit_message: ${{ github.event.head_commit.message }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}