From 02b1b3473ac9cfa8f486156f0f1cd178ffc779e2 Mon Sep 17 00:00:00 2001 From: Brord van Wierst Date: Mon, 4 Dec 2023 02:36:47 +0100 Subject: [PATCH] added old jsut in case --- .github/workflows/main_deploy.yaml | 2 +- .github/workflows/old.yml | 101 +++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/old.yml diff --git a/.github/workflows/main_deploy.yaml b/.github/workflows/main_deploy.yaml index 2243dd47f..084cb546e 100644 --- a/.github/workflows/main_deploy.yaml +++ b/.github/workflows/main_deploy.yaml @@ -30,13 +30,13 @@ jobs: mv docs public mv repo public || true mv build/web/ public/web - echo "app.staging.pangea.chat.im" > ./public/CNAME - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }} publish_dir: ./public publish_branch: gh-pages + cname: app.staging.pangea.chat.im update_sentry: runs-on: ubuntu-latest diff --git a/.github/workflows/old.yml b/.github/workflows/old.yml new file mode 100644 index 000000000..39f4f4277 --- /dev/null +++ b/.github/workflows/old.yml @@ -0,0 +1,101 @@ +name: Release Workflow + +on: + push: + branches: + - main + - pangea-merge + +concurrency: + group: release_workflow + cancel-in-progress: true + +jobs: + build_staging: + runs-on: ubuntu-latest + environment: staging + steps: + - uses: actions/checkout@v2 + - run: cat .github/workflows/versions.env >> $GITHUB_ENV + - run: echo "$WEB_APP_ENV" > .env + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} + + - name: Prepare web + run: ./scripts/prepare-web.sh + + - name: Build web + run: ./scripts/build-web.sh + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: web-artifact + path: ./build/web + + deploy_staging: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + + needs: build_staging + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up AWS CLI + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ AWS_DEFAULT_REGION }} + + build_staging: + runs-on: ubuntu-latest + environment: production + steps: + - uses: actions/checkout@v2 + - run: cat .github/workflows/versions.env >> $GITHUB_ENV + - run: echo "$WEB_APP_ENV" > .env + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} + + - name: Prepare web + run: ./scripts/prepare-web.sh + + - name: Build web + run: ./scripts/build-web.sh + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: web-artifact + path: ./build/web + + artifacts: + paths: + - ./build/web + + deploy_staging: + environment: production + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + + needs: build_staging + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up AWS CLI + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ AWS_DEFAULT_REGION }}