diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..3fee2ab --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,46 @@ +name: CI Build + +on: + pull_request: + branches: + - test-dev + paths-ignore: + - 'README.md' + - 'Release.md' + - '.github/workflows/release.yaml' + +jobs: + test: + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Nix + uses: cachix/install-nix-action@v16 + + - name: Build Archive + id: build_archive + run: | + make archive + if [ ! -f "wire-docs.tar.gz" ]; then + echo "Artifact not found!" + exit 1 + fi + + - name: Configure AWS credentials for DEV + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.DEV_AWS_ROLE_TO_ASSUME }} + aws-region: eu-west-1 + + - name: Deploy latest docs to S3 DEV account + run: | + mkdir -p tmp_extracted + tar -xzf ./wire-docs.tar.gz -C tmp_extracted + aws s3 sync tmp_extracted/latest s3://${{ secrets.DEV_BUCKET }}/latest + aws s3 sync tmp_extracted/site s3://${{ secrets.DEV_BUCKET }}/site + aws s3 cp tmp_extracted/versions.json s3://${{ secrets.DEV_BUCKET }}/versions.json + rm -rf tmp_extracted diff --git a/.overrides/404.html b/.overrides/404.html new file mode 100644 index 0000000..0cf2dc1 --- /dev/null +++ b/.overrides/404.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} + +{% block content %} +
+

Page moved or not found

+

+ We've recently introduced versioning in our documentation. + The page you're looking for may have moved under a versioned path. +

+

+ You’ll be automatically redirected to the latest version of this page, if it exists. +

+

+ 👉 Redirect to /latest/... +

+
+{% endblock %} + +{% block scripts %} + +{% endblock %} diff --git a/README.md b/README.md index adb53bd..e59a20a 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,19 @@ Wire documentation is hosted on . This project is made us - To fetch the latest updates from wire-server, run the following command. Note: Execute this command only when the remote repository has been updated with new changes. ``` - git submodule update --remote + git submodule update --remote --checkout --depth 1 -- wire-server ``` + - To checkout to a specific commit: + ``` + cd wire-server && git fetch --depth=1 origin && git checkout + ``` + + - To verify the submodule status: + ``` + git submodule status + ``` + - To optionally update the src/changelog/README.md based on the new changelog.md, run the following command: ``` rm src/changelog/README.md && \ diff --git a/build/build_versions.sh b/build/build_versions.sh index 68160f1..81bca08 100644 --- a/build/build_versions.sh +++ b/build/build_versions.sh @@ -60,7 +60,7 @@ git show-ref --tags | while read -r commit tag; do git checkout $TAG # pull the submodule - git submodule update --init wire-server + git submodule update --init --depth 1 wire-server # Check if tag exists in mike if [ -n "${existing_tags[$TAG]}" ]; then diff --git a/build/prepare.sh b/build/prepare.sh index 281a7e5..da67804 100644 --- a/build/prepare.sh +++ b/build/prepare.sh @@ -26,16 +26,16 @@ else fi; if [ -d "$TEMP_DIR/.git" ]; then - current_remote=$(git config --get remote.origin.url) + current_remote=$(git -C $TEMP_DIR config --get remote.origin.url) if [ "$current_remote" = "$ORIGINAL_DIR" ]; then cd $TEMP_DIR EXPECTED_AUTHOR="Wire Docs " - LAST_COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an <%ae>") + LAST_COMMIT_AUTHOR=$(git -C $TEMP_DIR log -1 --pretty=format:"%an <%ae>") if [ "$LAST_COMMIT_AUTHOR" = "$EXPECTED_AUTHOR" ]; then echo "Last commit by $EXPECTED_AUTHOR detected. Removing it..." - git reset --hard HEAD~1 - git pull origin $(cat .current_branch) + git -C $TEMP_DIR reset --hard HEAD~1 + git -C $TEMP_DIR pull origin $(cat .current_branch) else echo "Last commit was not by $EXPECTED_AUTHOR. No action taken." fi diff --git a/src/changelog/README.md b/src/changelog/README.md index 29c7066..29bca87 100644 --- a/src/changelog/README.md +++ b/src/changelog/README.md @@ -1,3 +1,6 @@ +* [[2025-04-07] (Chart Release 5.14.0)](changelog.md#2025-04-07-chart-release-5140) +* [[2025-03-07] (Chart Release 5.13.0)](changelog.md#2025-03-07-chart-release-5130) +* [[2025-03-06] (Chart Release 5.12.0)](changelog.md#2025-03-06-chart-release-5120) * [[2025-02-07] (Chart Release 5.11.0)](changelog.md#2025-02-07-chart-release-5110) * [[2025-01-28] (Chart Release 5.10.0)](changelog.md#2025-01-28-chart-release-5100) * [[2024-12-30] (Chart Release 5.9.0)](changelog.md#2024-12-30-chart-release-590) diff --git a/wire-server b/wire-server index 867eae0..9ff9dd6 160000 --- a/wire-server +++ b/wire-server @@ -1 +1 @@ -Subproject commit 867eae0dd612d6d0f3abd7577cc372b7927646a3 +Subproject commit 9ff9dd605d1b4aa3febf02635387a714fd0708f0