Skip to content

Commit

Permalink
remove api and change action to reflect
Browse files Browse the repository at this point in the history
  • Loading branch information
tsar-boomba committed May 1, 2024
1 parent e669f77 commit e472fdc
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 1,440 deletions.
49 changes: 2 additions & 47 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
base: "main"
# if a filter is false, it means that the only change matched it, so do not deploy
filters: |
not-api: '!api/**'
not-license: '!LICENSE*'
not-readme: '!**/README*'
not-vscode: '!.vscode/**'
Expand Down Expand Up @@ -52,54 +51,10 @@ jobs:
path: dist/
retention-days: 2

api-changes:
runs-on: ubuntu-latest

outputs:
changed: ${{ contains(steps.changes.outputs.changes, 'src') || contains(steps.changes.outputs.changes, 'actions') }}
steps:
- uses: actions/checkout@v4
- name: Changes
id: changes
uses: dorny/paths-filter@v2
with:
base: "main"
filters: |
src: api/**
actions: .github/**
deploy-api:
runs-on: ubuntu-latest
needs: api-changes
if: ${{ needs.api-changes.outputs.changed == 'true' && false }}
defaults:
run:
shell: bash
working-directory: api

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
- name: Install Shuttle
uses: taiki-e/install-action@v1
with:
tool: cargo-shuttle
- name: Login to Shuttle
run: cargo shuttle login --api-key ${{ secrets.SHUTTLE_API_KEY }}
- name: Create Secrets.toml
# add secrets from repo into a file for shuttle when we deploy
run: |
touch Secrets.toml
- name: Deploy
run: cargo shuttle deploy

deploy-pages:
runs-on: ubuntu-latest
needs: [build-pages, deploy-api]
if: ${{ !failure() && !cancelled() && (needs.build-pages.result == 'success' || needs.deploy-api.result == 'success' ) }}
needs: [build-pages]
if: ${{ !failure() && !cancelled() && needs.build-pages.result == 'success' }}
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
Expand Down
Loading

0 comments on commit e472fdc

Please sign in to comment.