From 11df8c7bed210074e4d925a733bbd5dacb95c90f Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 21 Apr 2023 15:30:04 +0200 Subject: [PATCH 1/2] Create deploy.yml --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..55f7544 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - master + pull_request: + branches: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: . + + deploy: + needs: build + if: github.ref == 'refs/heads/main' + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 From 5ff616345823b7a83e14d817cf885876421d3608 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 21 Apr 2023 15:35:49 +0200 Subject: [PATCH 2/2] Remove .git folder --- .github/workflows/deploy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 55f7544..aeb29fa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,6 +14,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + + - name: Cleanup the repo + run: | + rm -rf .git - name: Upload artifact uses: actions/upload-pages-artifact@v1