Skip to content

Commit

Permalink
(WIP) test
Browse files Browse the repository at this point in the history
  • Loading branch information
Godin committed Feb 12, 2024
1 parent a688001 commit 91f132e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 46 deletions.
4 changes: 2 additions & 2 deletions .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
pool:
vmImage: 'ubuntu-20.04'
steps:
# TODO test repository_dispatch
# TODO test repository_dispatch refs/pull/56/merge
# FIXME repository
# FIXME ref
- bash: |
curl --data '{"event_type": "jacoco build"}' \
-H "Authorization: token ${GH_TOKEN}" \
https://api.github.com/repos/Godin/www.eclemma.org/dispatches
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/pull/56/merge'))
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: Deploy
env:
GH_TOKEN: $(GH_TOKEN)
44 changes: 0 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,13 @@ name: CI
on:
- push
- pull_request
- repository_dispatch
jobs:
build:
runs-on: ubuntu-20.04
# TODO repository and ref
environment: ${{ (github.repository == 'Godin/www.eclemma.org' && github.ref == 'refs/heads/github-actions') && 'sites' || null }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: 'Build'
run: ./render.sh
- name: 'Deploy'
if: ${{ (github.repository == 'Godin/www.eclemma.org' && github.ref == 'refs/heads/github-actions') }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
run: |
WORKING_DIR="`pwd`/work"
RESULT_DIR=$WORKING_DIR/result
TEMP=/tmp/jacoco-snapshot
mkdir $TEMP
wget -O $TEMP/download.zip "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.jacoco&a=jacoco&e=zip&v=LATEST"
unzip $TEMP/download.zip -d $TEMP
TARGET=$RESULT_DIR/jacoco/trunk
mkdir $TARGET
cp $TEMP/index.html $TARGET
cp -r $TEMP/doc $TARGET/doc
cp -r $TEMP/test $TARGET/test
cp -r $TEMP/coverage $TARGET/coverage
cd work/result
# https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/
touch .nojekyll
git init
git config user.name ${GIT_COMMITTER_NAME}
git config user.email ${GIT_COMMITTER_EMAIL}
git add .
git commit -q -m "Automatic deployment"
git push --force "https://${GH_TOKEN}@github.com/jacoco/jacoco.github.io" master > /dev/null 2>&1
#echo "www.jacoco.org" > CNAME && git add CNAME && git commit -q --amend --reuse-message=HEAD
#git push --force "https://${GH_TOKEN}@github.com/jacoco/jacoco.org" master:gh-pages > /dev/null 2>&1
#echo "www.eclemma.org" > CNAME && git add CNAME && git commit -q --amend --reuse-message=HEAD
#git push --force "https://${GH_TOKEN}@github.com/jacoco/eclemma.org" master:gh-pages > /dev/null 2>&1
#echo "www.eclemma.com" > CNAME && git add CNAME && git commit -q --amend --reuse-message=HEAD
#git push --force "https://${GH_TOKEN}@github.com/jacoco/eclemma.com" master:gh-pages > /dev/null 2>&1

0 comments on commit 91f132e

Please sign in to comment.