-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kar
committed
Feb 22, 2023
1 parent
783aaa7
commit 44e9582
Showing
3 changed files
with
107 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Landing (Publish) | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- landing.** | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn | ||
|
||
- name: Build landing | ||
run: ./sync-landing.sh |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
|
||
# | ||
# This file is part of Blokada. | ||
# | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
# | ||
# Copyright © 2023 Blocka AB. All rights reserved. | ||
# | ||
# @author Karol Gusak ([email protected]) | ||
# | ||
|
||
set -e | ||
|
||
echo "Publishing landing: $1..." | ||
|
||
cd landing | ||
git co main | ||
git pull | ||
git co $1 | ||
git submodule update | ||
|
||
cd ../ | ||
|
||
commit="publish landing: $1" | ||
tag="landing.$1" | ||
|
||
git add landing | ||
git commit -m "$commit" | ||
git tag $tag | ||
|
||
git push | ||
git push --tags | ||
|
||
|
||
echo "Done" |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
# | ||
# This file is part of Blokada. | ||
# | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
# | ||
# Copyright © 2023 Blocka AB. All rights reserved. | ||
# | ||
# @author Karol Gusak ([email protected]) | ||
# | ||
|
||
set -e | ||
|
||
cd landing-github-pages | ||
git checkout master | ||
git pull | ||
cd .. | ||
|
||
cd landing | ||
|
||
hash=$(git describe --abbrev=4 --always --tags --dirty) | ||
echo "Syncing landing to live: $hash..." | ||
|
||
yarn build | ||
cp -r dist/* ../landing-github-pages/ | ||
echo "$hash" > ../landing-github-pages/version.txt | ||
|
||
cd .. | ||
|
||
commit="publish landing: $hash" | ||
|
||
cd landing-github-pages | ||
git add . | ||
git commit -am "$commit" | ||
git tag "deploy-$hash" | ||
git push | ||
git push --tags | ||
|
||
echo "Done" |