Skip to content

Commit 52fa41d

Browse files
committed
Sync with upstream: 297079d4107c751bf2597f4d50e109336ac1c614
0 parents  commit 52fa41d

File tree

227 files changed

+136948
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+136948
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy Conference Web site
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout source
12+
uses: actions/checkout@v2
13+
with:
14+
path: main
15+
- name: Setup node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 10.x
19+
- name: Install hexo dependencies
20+
run: |
21+
cd main
22+
npm install
23+
- name: Generate website
24+
run: |
25+
cd main
26+
npm run generate
27+
- name: Checkout gh-pages
28+
uses: actions/checkout@v2
29+
with:
30+
path: gh-pages-pre
31+
ref: gh-pages
32+
fetch-depth: 0
33+
- name: Publish to gh-pages
34+
run: |
35+
mv main/public gh-pages
36+
cp -r gh-pages-pre/.git gh-pages/
37+
cd gh-pages
38+
git config --local user.email "[email protected]"
39+
git config --local user.name "Bot"
40+
git add .
41+
git commit -m "Auto Deploy at `date +"%Y-%m-%d %H:%M"`"
42+
git push origin gh-pages

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
Thumbs.db
3+
db.json
4+
*.log
5+
node_modules
6+
public/
7+
.deploy*/

.gitlab-ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
image: node:12.18.3
2+
3+
cache:
4+
paths:
5+
- node_modules/
6+
7+
# created for initial tests; not used
8+
# deploy:
9+
# stage: deploy
10+
# before_script:
11+
# - npm install netlify-cli -g
12+
# - npm install
13+
# script:
14+
# - npx hexo clean && npx hexo g
15+
# - "LIVE_URL=$(netlify deploy --json --dir=public/ -s $NETLIFY_SITE_ID -a $NETLIFY_AUTH_TOKEN | grep -oP '(?<=\"deploy_url\": \")[^\"]*')"
16+
# - "curl -X POST -H 'Content-type: application/json' --data '{\"text\": \"$CI_PROJECT_NAME deployato con successo dal branch $CI_COMMIT_REF_NAME, $LIVE_URL\"}' $SLACK_WEBHOOK_URL"
17+
# only:
18+
# - branches
19+
# when: manual
20+
21+
deploy_prod:
22+
stage: deploy
23+
before_script:
24+
- npm install netlify-cli -g
25+
- npm install
26+
script:
27+
- npm run generate
28+
- "LIVE_URL=$(netlify deploy --json --prod --dir=public/ -s $NETLIFY_SITE_ID -a $NETLIFY_AUTH_TOKEN | grep -oP '(?<=\"url\": \")[^\"]*')"
29+
- "curl -X POST $SLACK_WEBHOOK_URL -H 'Content-type: application/json' --data '{\"text\": \"Una nuova versione del sito è stata pubblicata con successo\"}'"
30+
only:
31+
refs:
32+
- master

0 commit comments

Comments
 (0)