Skip to content
This repository was archived by the owner on May 10, 2023. It is now read-only.

Commit 5313dcf

Browse files
authored
Merge pull request #462 from minvws/github-workflows
GitHub workflows
2 parents 9b21977 + 78a2c20 commit 5313dcf

1 file changed

Lines changed: 98 additions & 13 deletions

File tree

.github/workflows/package.yml

Lines changed: 98 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,111 @@
1-
---
2-
3-
name: Build and deploy Jekyll site
1+
name: Create Website Release package
42

53
on:
64
push:
75
branches:
8-
- github-workflow
6+
- github-workflows
97
tags:
10-
- v*
8+
- 'v*'
9+
1110

1211
jobs:
1312
build:
13+
1414
runs-on: ubuntu-20.04
15+
1516
steps:
17+
- name: Set env
18+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
19+
1620
- uses: actions/checkout@v2
17-
- uses: actions/cache@v2
21+
22+
- name: Setup Ruby
23+
uses: ruby/setup-ruby@v1
1824
with:
19-
path: vendor/bundle
20-
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
21-
restore-keys: |
22-
${{ runner.os }}-gems-
23-
- uses: helaili/jekyll-action@2.0.5 # Choose any one of the Jekyll Actions
24-
with: # Some relative inputs of your action
25-
token: ${{ secrets.GITHUB_TOKEN }}
25+
ruby-version: 2.7
26+
bundler-cache: true
27+
28+
- name: Install Jekyll
29+
run: |
30+
bundle config path vendor/bundle
31+
bundle install --jobs 4 --retry 3
32+
bundle update --bundler
2633
34+
- name: Build site
35+
run: bundle exec jekyll build
36+
37+
- name: Create version.json
38+
run: 'echo "{ \"version\": \"${{ env.RELEASE_VERSION }}\", \"git_ref\": \"$GITHUB_SHA\"}" > ./_site/version.json'
39+
40+
- name: Rename folder
41+
run: mv _site public
42+
43+
#
44+
# - name: Install Node.js
45+
# uses: actions/setup-node@v2
46+
# with:
47+
# node-version: '14.x'
48+
#
49+
# - name: Create NL print portal
50+
# run: |
51+
# cd print-portal
52+
# npm install -g @vue/cli-service
53+
# npm install --production=false
54+
# npm run build --if-present
55+
# env:
56+
# NODE_ENV: production
57+
#
58+
# - name: Copy print portal to public
59+
# run: mv print-portal/dist public/nl/print
60+
#
61+
# - name: Remake for EN print portal
62+
# run: |
63+
# sed -i 's/nl\/print/en\/print/g' print-portal/vue.config.js
64+
#
65+
# - name: Create EN print portal
66+
# run: |
67+
# cd print-portal
68+
# npm run build --if-present
69+
# env:
70+
# NODE_ENV: production
71+
#
72+
# - name: Copy print portal to public
73+
# run: mv print-portal/dist public/en/print
74+
#
75+
# - name: Create dashboard SPA
76+
# run: |
77+
# cd dashboard-spa
78+
# npm install --production=false
79+
# npm run build
80+
# env:
81+
# NODE_ENV: production
82+
#
83+
# - name: Copy dashboard SPA to public
84+
# run: mv dashboard-spa/dist/* public/js/
85+
#
86+
# - name: Copy fonts
87+
# run: cp -R public/nl/print/assets/fonts public/assets/
88+
#
89+
# - name: Copy img
90+
# run: cp -R public/nl/print/assets/img public/assets/
91+
#
92+
# - name: Copy auth redirect script
93+
# run: cp -R auth.php public/app/auth.php
94+
# - name: Copy auth2 redirect script
95+
# run: cp -R auth2.php public/app/auth2.php
96+
#
97+
# - name: Install jsonlint
98+
# run: sudo apt-get install --yes jsonlint
99+
#
100+
# - name: Lint json files
101+
# run: find . -size +2c \( -name *.json -o -name *.json.v* \) -not -path "./print-portal/node_modules/*" -not -path "./dashboard-spa/node_modules/*" | xargs jsonlint-php
102+
#
103+
104+
- name: Create tar
105+
run: tar -czf cm_website_${{ env.RELEASE_VERSION }}.tar.gz ./public
106+
107+
- name: Upload release tar
108+
uses: actions/upload-artifact@v2
109+
with:
110+
name: cm_website_${{ env.RELEASE_VERSION }}
111+
path: cm_website_${{ env.RELEASE_VERSION }}.tar.gz

0 commit comments

Comments
 (0)