From df32fe23f15c79c4809f1c3bc18538aa58a822f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pelayo=20Rojas=20=C3=8D=C3=B1igo?= <31128562+Pelayori@users.noreply.github.com> Date: Sun, 18 Feb 2024 22:20:38 +0100 Subject: [PATCH] Deploy gh pages action (#42) * Test auto deploy * add git info * fix syntax error * More testing --- .github/workflows/deploy-pages.yml | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/deploy-pages.yml diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 00000000..17f52253 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,42 @@ +name: Deploy Pages +on: + push: + branches: [ master, develop, deploy-gh-pages ] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0' + + - name: Install Asciidoctor and Asciidoctor-diagram + run: gem install asciidoctor asciidoctor-diagram + + - name: Install Graphviz + run: sudo apt-get install graphviz + + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: '14.x' + + - name: Install npm dependencies in docs + run: cd docs && npm install + + - name: Build project + run: cd docs && npm run build + + - name: Deploy to GitHub Pages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + cd docs + npx gh-pages -d build -r https://x-access-token:${GITHUB_TOKEN}@github.com/Arquisoft/wiq_es04b.git