-
Notifications
You must be signed in to change notification settings - Fork 116
47 lines (38 loc) · 1.27 KB
/
publish.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
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
push:
branches: [ main ]
jobs:
publish:
runs-on: ubuntu-latest
env:
NOKOGIRI_USE_SYSTEM_LIBRARIES: "true"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- run: npm ci --legacy-peer-deps
- run: make download-data
- run: make jekyll-build
env:
ELASTICSEARCH_PASS: ${{ secrets.ELASTICSEARCH_PASS }}
ELASTICSEARCH_USER: ${{ secrets.ELASTICSEARCH_USER }}
ELASTICSEARCH_URL: "https://elasticsearch.developers.italia.it"
- run: cp -r .well-known _site/
# Make GitHub skip its Jekyll support and serve all the files
# we built with our own Jekyll. This includes dotfiles.
- run: touch _site/.nojekyll
- run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
echo developers.italia.it > _site/CNAME
npm run deploy -- --dotfiles -m "Automated deployment: ${GITHUB_SHA} [ci skip]"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}