Skip to content

Commit

Permalink
Merge branch 'docs' of github.com:ifilot/edp into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed Jul 14, 2023
2 parents 0fab89a + cb1f3c0 commit 68499d6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: docs

on:
push:
branches: [ "master" ]
branches: [ "docs" ]
pull_request:
branches: [ "master" ]
branches: [ "docs" ]

jobs:
build-docs:
Expand All @@ -24,13 +24,41 @@ jobs:
path: ./docs/_build/html

deploy:
runs-on: [self-hosted, linux, x64]
runs-on: ubuntu-latest
needs: build-docs
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Download docs
uses: actions/download-artifact@v3
with:
name: html-docs
path: html-docs
- name: Deploy
run: touch ${{ secrets.DEPLOY_PATH }}/html && rm -r ${{ secrets.DEPLOY_PATH }}/html/* && cp -rv html-docs/* ${{ secrets.DEPLOY_PATH }}/html

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/ifilot/edp-docs-nginx
- 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 images
uses: docker/build-push-action@v4
with:
context: .
file: doc.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 2 additions & 0 deletions doc.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM nginx:latest
COPY html-docs/ /usr/share/nginx/html/

0 comments on commit 68499d6

Please sign in to comment.