diff --git a/.gitea/workflows/action.yml b/.gitea/workflows/action.yml index 91b1957..c3cce02 100644 --- a/.gitea/workflows/action.yml +++ b/.gitea/workflows/action.yml @@ -26,7 +26,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-debug- - name: Build run: | @@ -43,7 +44,6 @@ jobs: # path: frontend/playwright-report/ # retention-days: 30 - deploy-staging: runs-on: ubuntu-latest container: git.hofer.link/ruderverein-donau-linz/rowing-ci:20240118 @@ -65,8 +65,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - + key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-release- - name: Build run: | cargo build --release --target $CARGO_TARGET @@ -75,7 +75,7 @@ jobs: - name: Deploy to Staging run: | - mkdir ~/.ssh + mkdir -p ~/.ssh ssh-keyscan -H $SSH_HOST >> ~/.ssh/known_hosts echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa @@ -116,7 +116,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-release- - name: Build run: | @@ -124,9 +125,9 @@ jobs: strip target/$CARGO_TARGET/release/rot cd frontend && npm install && npm run build - - name: Deploy to Main + - name: Deploy to production run: | - mkdir ~/.ssh + mkdir -p ~/.ssh ssh-keyscan -H $SSH_HOST >> ~/.ssh/known_hosts echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa diff --git a/Dockerfile b/Dockerfile index bf52e2a..5db574a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,6 @@ # 2. Tag the image: `docker tag git.hofer.link/ruderverein-donau-linz/rowing-ci:` # 3. Push the image: `docker push git.hofer.link/ruderverein-donau-linz/rowing-ci:` - FROM rust:1.75.0 RUN apt-get update && apt-get install -y sqlite3