diff --git a/.github/workflows/scheduler.yml b/.github/workflows/scheduler.yml index 0e46b5b..a24f18a 100644 --- a/.github/workflows/scheduler.yml +++ b/.github/workflows/scheduler.yml @@ -10,8 +10,36 @@ permissions: contents: read jobs: - build: - name: scheduler + build-web: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::082113759242:role/github_oidc_role + aws-region: eu-central-1 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '22.11.0' + + - name: Install Yarn + run: npm install -g yarn@1.22.22 + + - name: Install dependencies + working-directory: web + run: yarn install + + - name: Build project + working-directory: web + run: yarn build + + - name: Upload to S3 + working-directory: web + run: | + aws s3 sync ./build s3://schafkopf-web-082113759242 --delete + build-scheduler: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -29,7 +57,7 @@ jobs: docker push 082113759242.dkr.ecr.eu-central-1.amazonaws.com/schafkopf-scheduler-lambda:latest deploy: runs-on: ubuntu-latest - needs: build + needs: build-scheduler steps: - uses: actions/checkout@v3 - name: Configure AWS Credentials diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml deleted file mode 100644 index f5743c7..0000000 --- a/.github/workflows/web.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Website - -on: - push: - branches: - - main - -permissions: - id-token: write - contents: read - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::082113759242:role/github_oidc_role - aws-region: eu-central-1 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '22.11.0' - - - name: Install Yarn - run: npm install -g yarn@1.22.22 - - - name: Install dependencies - working-directory: web - run: yarn install - - - name: Build project - working-directory: web - run: yarn build - - - name: Upload to S3 - working-directory: web - run: | - aws s3 sync ./build s3://schafkopf-web-082113759242 --delete