From 0a23ad53c1f86c8bc148414dd62e42bc098e68d7 Mon Sep 17 00:00:00 2001 From: Fritz Hoeing Date: Fri, 21 Apr 2023 13:47:22 +0200 Subject: [PATCH] feat: add gh-pages --- .github/workflows/hg-pages.yml | 39 ++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 27 ----------------------- 2 files changed, 39 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/hg-pages.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/hg-pages.yml b/.github/workflows/hg-pages.yml new file mode 100644 index 0000000..44c76a1 --- /dev/null +++ b/.github/workflows/hg-pages.yml @@ -0,0 +1,39 @@ + +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + +jobs: + deploy: + name: Deploy to GitHub Pages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + + - name: Install dependencies + run: npm ci + - name: Build website + run: npm run build + + # Popular action to deploy to GitHub Pages: + # Docs: /~https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + # Build output to publish to the `gh-pages` branch: + publish_dir: ./build + # The following lines assign commit authorship to the official + # GH-Actions bot for deploys to `gh-pages` branch: + # /~https://github.com/actions/checkout/issues/13#issuecomment-724415212 + # The GH actions bot is used by default if you didn't specify the two fields. + # You can swap them out with your own user credentials. + user_name: github-actions[bot] + user_email: 41898282+github-actions[bot]@users.noreply.github.com \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index b430441..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,27 +0,0 @@ -stages: - - deploy - -create_and_push_image: - stage: deploy - image: docker:20.10.17-alpine3.16 - environment: - name: nexus - tags: - - default - - dockerbuilder - variables: - IMAGE_NAME: shogun-docker.terrestris.de/shogun-docs - IMAGE_TAG: main - rules: - # Run for main branch and tags only - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_COMMIT_REF_NAME =~ /^\d\.\d\.\d/ - variables: - IMAGE_TAG: $CI_COMMIT_REF_NAME - script: - - mkdir -p $HOME/.docker/ - - echo "$DOCKER_AUTH_CONFIG" > $HOME/.docker/config.json - - docker build -t $IMAGE_NAME:$IMAGE_TAG . - - docker tag $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:latest - - docker push $IMAGE_NAME:$IMAGE_TAG - - docker push $IMAGE_NAME:latest