-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move tasks from Makefile to GitHub workflow * Rise version number to 1.8.4 * Update changelog * Remove duplicate entry
- Loading branch information
Showing
8 changed files
with
170 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ jobs: | |
THEME_VERSION=$(cat sass/style.scss | grep Version | sed -r 's/version: +//I') | ||
V="v" | ||
echo Version in style.scss: $THEME_VERSION | ||
if [ "$V$THEME_VERSION" != "${{ github.ref_name }}" ]; then exit 1; fi | ||
- uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -62,17 +63,31 @@ jobs: | |
- name: Provide deploy_key | ||
env: | ||
DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
SSH_USER: 'github-ci' | ||
SSH_HOST: 'wordpress05.gcms.verdigado.net' | ||
run: | | ||
mkdir "$HOME/.ssh" | ||
echo "$DEPLOY_KEY" > "$HOME/.ssh/id_rsa" | ||
file "$HOME/.ssh/id_rsa" | ||
chmod 600 "$HOME/.ssh/id_rsa" | ||
echo "$DEPLOY_KEY" > "$HOME/.ssh/production.key" | ||
chmod 600 "$HOME/.ssh/production.key" | ||
cat >> ~/.ssh/config <<END | ||
Host production | ||
HostName $SSH_HOST | ||
User $SSH_USER | ||
IdentityFile ~/.ssh/production.key | ||
StrictHostKeyChecking no | ||
END | ||
- name: save version | ||
run: echo ${GITHUB_REF##*/} > version.txt | ||
run: echo ${{ github.ref_name }} > version.txt | ||
|
||
- name: rsync zipfile, version and changelog | ||
run: rsync -a -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" ../sunflower-${{ github.ref_name }}.zip version.txt [email protected]:/var/www/updateserver/ | ||
env: | ||
PAGEID: 1952 | ||
run: | | ||
rsync -a sunflower-${{ github.ref_name }}.zip version.txt sunflower/changelog.html production:/var/www/updateserver/ | ||
THEME_VERSION=$(cat version.txt | sed -e 's/^v//') | ||
ssh production "cd /var/www && wp post get $PAGEID --field=content | sed -e 's/<version>[^<]*/<version>$THEME_VERSION/g' > /tmp/content-$PAGEID.txt" | ||
ssh production "cd /var/www && wp post update $PAGEID - < /tmp/content-$PAGEID.txt && wp option update blogdescription 'Demoseite für das WordPress-Theme Sunflower $THEME_VERSION' --url=sunflower-theme.de/demo && wp option update blogname 'Sunflower $THEME_VERSION'" | ||
mkdocs: | ||
runs-on: ubuntu-latest | ||
|
@@ -91,14 +106,22 @@ jobs: | |
- name: Provide deploy_key | ||
env: | ||
DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
SSH_USER: 'github-ci' | ||
SSH_HOST: 'wordpress05.gcms.verdigado.net' | ||
run: | | ||
mkdir "$HOME/.ssh" | ||
echo "$DEPLOY_KEY" > "$HOME/.ssh/id_rsa" | ||
file "$HOME/.ssh/id_rsa" | ||
chmod 600 "$HOME/.ssh/id_rsa" | ||
echo "$DEPLOY_KEY" > "$HOME/.ssh/production.key" | ||
chmod 600 "$HOME/.ssh/production.key" | ||
cat >> ~/.ssh/config <<END | ||
Host production | ||
HostName $SSH_HOST | ||
User $SSH_USER | ||
IdentityFile ~/.ssh/production.key | ||
StrictHostKeyChecking no | ||
END | ||
- name: save version | ||
run: echo ${GITHUB_REF##*/} > version.txt | ||
|
||
- name: rsync documentation | ||
run: rsync -a -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" --delete documentation [email protected]:/var/www/documentation/ | ||
run: rsync -a --delete documentation production:/var/www/documentation/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.