You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by bd...@apache.org on 2024/01/22 16:37:32 UTC
(shiro-site) branch main updated: Adds workflow to publish site (#195)
This is an automated email from the ASF dual-hosted git repository.
bdemers pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shiro-site.git
The following commit(s) were added to refs/heads/main by this push:
new a33a9246e Adds workflow to publish site (#195)
a33a9246e is described below
commit a33a9246e9830b55e9d4d2042832a1fefed8f539
Author: Brian Demers <bd...@apache.org>
AuthorDate: Mon Jan 22 11:37:27 2024 -0500
Adds workflow to publish site (#195)
* Adds workflow to publish site
* Publish workflows will delete any removed files from the published site
---
.github/workflows/{staging.yml => publish.yml} | 28 +++++++++-----------------
.github/workflows/staging.yml | 2 +-
2 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/.github/workflows/staging.yml b/.github/workflows/publish.yml
similarity index 70%
copy from .github/workflows/staging.yml
copy to .github/workflows/publish.yml
index bd6b9561b..a45b9348f 100644
--- a/.github/workflows/staging.yml
+++ b/.github/workflows/publish.yml
@@ -15,14 +15,13 @@
# specific language governing permissions and limitations
# under the License.
-# This action will make the current branch available
-# under https://shiro.staged.apache.org/
+# This action will build and publish branch to
+# https://shiro.apache.org/
name: Stage current branch
on:
workflow_dispatch: {}
-
jobs:
build:
runs-on: ubuntu-latest
@@ -34,14 +33,6 @@ jobs:
path: 'src'
persist-credentials: false
- - run: sed -i.bak 's/site.host=.*/site.host=https:\/\/shiro.staged.apache.org\//g' jbake.properties && rm jbake.properties.bak
- shell: bash
- working-directory: ./src
-
- - run: mv src/site/assets/robots.staging.txt src/site/assets/robots.txt
- shell: bash
- working-directory: ./src
-
- uses: actions/setup-java@v4
with:
java-version: '11'
@@ -54,21 +45,20 @@ jobs:
uses: actions/checkout@v4
with:
repository: 'apache/shiro-site'
- ref: 'asf-staging'
- path: 'site-staging'
+ ref: 'asf-site'
+ path: 'asf-site'
- - name: 'Copy to staging'
+ - name: 'Copy build to site repo'
run: |
- rsync -a src/target/website/. ./site-staging
+ rsync -avP --delete --exclude .git src/target/website/. ./asf-site
shell: bash
- - name: 'commit staging'
- working-directory: ./site-staging
+ - name: 'commit site'
+ working-directory: ./asf-site
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add .
- git commit -m "staging $(date -Is)"
+ git commit -m "publishing $(date -Is)"
git push
shell: bash
-
diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml
index bd6b9561b..4a066d529 100644
--- a/.github/workflows/staging.yml
+++ b/.github/workflows/staging.yml
@@ -59,7 +59,7 @@ jobs:
- name: 'Copy to staging'
run: |
- rsync -a src/target/website/. ./site-staging
+ rsync -avP --delete --exclude .git src/target/website/. ./asf-staging
shell: bash
- name: 'commit staging'