Update README with access link and project description #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy WebBeat | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build with Maven | |
| run: | | |
| chmod +x mvnw | |
| ./mvnw package -Dmaven.test.skip=true | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| push: true | |
| tags: ghcr.io/webbeat-system/webbeat:latest | |
| deploy-local: | |
| needs: build-and-push | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout Config | |
| uses: actions/checkout@v3 | |
| - name: Create .env file | |
| run: echo "${{ secrets.ENV_FILE }}" > .env | |
| - name: Refresh Docker Images | |
| run: | | |
| echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| docker compose pull | |
| docker compose up -d --remove-orphans | |
| docker image prune -f |