From 7ca63344c73de5a58e1a185f09d7453bca303cf5 Mon Sep 17 00:00:00 2001 From: matias Date: Sun, 15 Oct 2023 16:31:15 -0300 Subject: [PATCH] feat: add workflow deploy web --- .github/workflows/deploy-website.yml | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/deploy-website.yml diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml new file mode 100644 index 0000000..e49ff90 --- /dev/null +++ b/.github/workflows/deploy-website.yml @@ -0,0 +1,30 @@ +name: Deploy Website + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Deploy Website + run: | + mkdir website_temp + cp -r website/* website_temp/ + git checkout --orphan temp-branch + git reset -- * + mv website_temp/* ./ + rm -r website_temp + git add . + git commit -m "Deploy website" + git branch -D main + git branch -m main + git push -f origin main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}