Skip to content

Commit

Permalink
chore: update gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Jun 24, 2022
1 parent 60412b7 commit d2e85a6
Show file tree
Hide file tree
Showing 5 changed files with 409 additions and 4 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/update_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Update documentation
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: main
- name: Use Node.js 14.x 🪢
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: sudo apt-get update && sudo apt-get install -y zip
- run: npm ci
- run: npm run build
- name: Publish on gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run documentation-deploy-to-gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
node_modules
build/index.html
dist
24 changes: 24 additions & 0 deletions gh-pages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh


mkdir dist

npm run build

cp -a ./build/. ./dist/

curl -LkSs https://github.com/italia/design-scuole-pagine-statiche/archive/refs/tags/v1.0.0.zip -o dist/1.zip

unzip dist/1.zip -d dist

rm -rf dist/1.zip

cp -R ./scripts ./dist/design-scuole-pagine-statiche-1.0.0/scripts

cp -R ./templates ./dist/design-scuole-pagine-statiche-1.0.0/templates

cd ./dist/design-scuole-pagine-statiche-1.0.0/ && node scripts/generateIndex.js && cd ../../

cp -R dist/design-scuole-pagine-statiche-1.0.0/build dist/1.x

rm -rf dist/design-scuole-pagine-statiche-1.0.0
Loading

0 comments on commit d2e85a6

Please sign in to comment.