generated from pixx/chirpy-starter
This commit is contained in:
@@ -35,10 +35,6 @@ jobs:
|
|||||||
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
|
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
|
||||||
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
|
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
|
||||||
|
|
||||||
- name: Setup Pages
|
|
||||||
id: pages
|
|
||||||
uses: actions/configure-pages@v4
|
|
||||||
|
|
||||||
- name: Setup Ruby
|
- name: Setup Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
@@ -56,18 +52,22 @@ jobs:
|
|||||||
\-\-disable-external \
|
\-\-disable-external \
|
||||||
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
|
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
|
||||||
|
|
||||||
- name: Upload site artifact
|
- name: Build Docker image
|
||||||
uses: actions/upload-pages-artifact@v3
|
run: |
|
||||||
with:
|
echo "FROM nginx:alpine" > Dockerfile
|
||||||
path: "_site${{ steps.pages.outputs.base_path }}"
|
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user