diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 9f9ed96..18a2d41 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -8,7 +8,7 @@ x-site-config: &site_matrix include: - site: "test" dest: /var/www/crashtest - secret_key: "CONFIG_TEST" + config_file: "test.json" # - site: "harbor" # dest: /var/www/harbor # secret_key: "CONFIG_HARBOR" @@ -25,22 +25,18 @@ jobs: strategy: matrix: *site_matrix - defaults: - run: - working-directory: ./source - steps: - name: Checkout git repository uses: actions/checkout@v4 with: path: "source" - - name: Inject configs - env: - CONF: ${{ secrets[matrix.secret_key] }} - run: | - echo "$CONF" > src/data/content.json - echo "$CONF" + - name: Retrieve configs + uses: actions/checkout@v4 + with: + repository: ${{ secrets.CONFIG_REPO }} + ssh-key: ${{ secrets.CONFIG_REPO_SSH_KEY }} + path: "configs" - name: Install pnpm uses: pnpm/action-setup@v4 @@ -52,8 +48,11 @@ jobs: with: node-version: 22 - - name: Install dependencies - run: pnpm install + - name: Install dependencies and config + run: | + cp ./configs/${{ matrix.config_file }} ./source/src/data/content.json + cd ./source + pnpm install - name: Build the project run: pnpm run build