-
Notifications
You must be signed in to change notification settings - Fork 48
61 lines (60 loc) · 1.92 KB
/
build_pages_native.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: build_test_deploy
run-name: Build, test and deploy website (if needed)
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.7'
# - name: install prerequisites
# run: pip3 install html5validator requests && gem install --no-document html-proofer
- name: install prerequisites
run: pip3 install requests
- name: Update external content
run: ./update.sh
- name: Clean up stubs
run: rm -rf _cases/3000 _cves/CVE-3000-*
- name: Build
run: bundle exec jekyll build --future 2>&1 | tee jekyll-build.log
- name: "Fix security.txt"
run: mkdir _site/.well-known && (cd _site/.well-known && ln -s ../security.txt) && ls -al _site/.well-known
# - name: Test HTML code
# run: ./proof_html.sh
- name: Test HTML code
uses: Cyb3r-Jak3/[email protected]
with:
root: _site/
- name: Upload HTML test report
uses: actions/upload-artifact@v3
if: success() || failure() # Run even if we had an error
with:
name: html5validator_log
path: log.log
- name: rsync deploy
uses: burnett01/[email protected]
if: ${{ github.ref == 'refs/heads/main' }}
with:
switches: -avzr --delete
path: _site/
remote_path: htdocs/csirt-divd-nl
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY_CSIRT }}