Skip to content

Commit

Permalink
Sync with upstream: aa4c6de4ca9f487083dd4f0bdcaa8b30c0cc6b40
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeccati committed Oct 17, 2024
0 parents commit 4ba5a9a
Show file tree
Hide file tree
Showing 227 changed files with 136,834 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy Conference Web site

on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
path: main
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install hexo dependencies
run: |
cd main
npm install
- name: Generate website
run: |
cd main
npm run generate
- name: Checkout gh-pages
uses: actions/checkout@v2
with:
path: gh-pages-pre
ref: gh-pages
fetch-depth: 0
- name: Publish to gh-pages
run: |
mv main/public gh-pages
cp -r gh-pages-pre/.git gh-pages/
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "Bot"
git add .
git commit -m "Auto Deploy at `date +"%Y-%m-%d %H:%M"`"
git push origin gh-pages
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
Thumbs.db
db.json
*.log
node_modules
public/
.deploy*/
32 changes: 32 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
image: node:12.18.3

cache:
paths:
- node_modules/

# created for initial tests; not used
# deploy:
# stage: deploy
# before_script:
# - npm install netlify-cli -g
# - npm install
# script:
# - npx hexo clean && npx hexo g
# - "LIVE_URL=$(netlify deploy --json --dir=public/ -s $NETLIFY_SITE_ID -a $NETLIFY_AUTH_TOKEN | grep -oP '(?<=\"deploy_url\": \")[^\"]*')"
# - "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"
# only:
# - branches
# when: manual

deploy_prod:
stage: deploy
before_script:
- npm install netlify-cli -g
- npm install
script:
- npm run generate
- "LIVE_URL=$(netlify deploy --json --prod --dir=public/ -s $NETLIFY_SITE_ID -a $NETLIFY_AUTH_TOKEN | grep -oP '(?<=\"url\": \")[^\"]*')"
- "curl -X POST $SLACK_WEBHOOK_URL -H 'Content-type: application/json' --data '{\"text\": \"Una nuova versione del sito è stata pubblicata con successo\"}'"
only:
refs:
- master
Loading

0 comments on commit 4ba5a9a

Please sign in to comment.