diff --git a/.gitea/workflows/pages-deploy.yml b/.gitea/workflows/pages-deploy.yml index cc28f99..ead3ac8 100644 --- a/.gitea/workflows/pages-deploy.yml +++ b/.gitea/workflows/pages-deploy.yml @@ -35,10 +35,6 @@ jobs: # If using the 'assets' git submodule from Chirpy Starter, uncomment above # (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets) - - name: Setup Pages - id: pages - uses: actions/configure-pages@v4 - - name: Setup Ruby uses: ruby/setup-ruby@v1 with: @@ -56,18 +52,22 @@ jobs: \-\-disable-external \ \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" - - name: Upload site artifact - uses: actions/upload-pages-artifact@v3 - with: - path: "_site${{ steps.pages.outputs.base_path }}" + - name: Build Docker image + run: | + echo "FROM nginx:alpine" > Dockerfile + echo "COPY _site /usr/share/nginx/html" >> Dockerfile + echo "EXPOSE 80" >> Dockerfile + docker build -t ${CI_REGISTRY_IMAGE:-gitea.local:3000/${{ gitea.repository }}}:${{ gitea.sha }} . + + - name: Login to Gitea Container Registry + run: | + echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${CI_REGISTRY:-gitea.local:3000} \ + -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin + + - name: Push Docker image + run: | + docker tag ${CI_REGISTRY_IMAGE:-gitea.local:3000/${{ gitea.repository }}}:${{ gitea.sha }} \ + ${CI_REGISTRY_IMAGE:-gitea.local:3000/${{ gitea.repository }}}:latest + docker push ${CI_REGISTRY_IMAGE:-gitea.local:3000/${{ gitea.repository }}}:${{ gitea.sha }} + docker push ${CI_REGISTRY_IMAGE:-gitea.local:3000/${{ gitea.repository }}}:latest - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4