diff --git a/.github/workflows/sync-from-gitea.yml b/.github/workflows/sync-from-gitea.yml new file mode 100644 index 0000000..600ec8e --- /dev/null +++ b/.github/workflows/sync-from-gitea.yml @@ -0,0 +1,73 @@ +name: Sync from Gitea (master→main, keep workflow) + +on: + schedule: + # 2 times per day (UTC): 7:00, 11:00 + - cron: '0 7,11 * * *' + workflow_dispatch: {} + +permissions: + contents: write # allow pushing with GITHUB_TOKEN + +jobs: + mirror: + runs-on: ubuntu-latest + + steps: + - name: Check out GitHub repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Fetch from Gitea + env: + GITEA_URL: ${{ secrets.GITEA_URL }} + GITEA_USER: ${{ secrets.GITEA_USERNAME }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + run: | + # Build authenticated Gitea URL: https://USER:TOKEN@... + AUTH_URL="${GITEA_URL/https:\/\//https:\/\/$GITEA_USER:$GITEA_TOKEN@}" + + git remote add gitea "$AUTH_URL" + git fetch gitea --prune + + - name: Update main from gitea/master, keep workflow, and force-push + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + run: | + # Configure identity for commits made by this workflow + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + # Authenticated push URL for GitHub + git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GH_REPO}.git" + + WF_PATH=".github/workflows/sync-from-gitea.yml" + + # If the workflow exists in the current checkout, save a copy + if [ -f "$WF_PATH" ]; then + mkdir -p /tmp/gh-workflows + cp "$WF_PATH" /tmp/gh-workflows/ + fi + + # Reset local 'main' to exactly match gitea/master + if git show-ref --verify --quiet refs/remotes/gitea/master; then + git checkout -B main gitea/master + else + echo "No gitea/master found, nothing to sync." + exit 0 + fi + + # Restore the workflow into the new HEAD and commit if needed + if [ -f "/tmp/gh-workflows/sync-from-gitea.yml" ]; then + mkdir -p .github/workflows + cp /tmp/gh-workflows/sync-from-gitea.yml "$WF_PATH" + git add "$WF_PATH" + if ! git diff --cached --quiet; then + git commit -m "Inject GitHub sync workflow" + fi + fi + + # Force-push main so GitHub mirrors Gitea + workflow + git push origin main --force \ No newline at end of file diff --git a/content/Math401/Extending_thesis/Math401_S5.md b/content/Math401/Extending_thesis/Math401_S5.md new file mode 100644 index 0000000..a69949d --- /dev/null +++ b/content/Math401/Extending_thesis/Math401_S5.md @@ -0,0 +1,42 @@ +# Math 401, Fall 2025: Thesis notes, S4, Differential Forms + +This note aim to investigate What is homology and cohomology? + +To answer this question, it's natural to revisit some concepts we have in Calc III. Particularly, Stoke's Theorem and De Rham Theorem. + +Recall that the Stock's theorem states that: + +$$ +\int_c d\omega=\int_{\partial c} \omega +$$ + +Where $\partial c$ is a closed curve and $\omega$ is a 1-form. + +What is form means here? + +> This section is based on extension for conversation with Professor Feres on [11/12/2025]. + +## Differential Forms and applications + +> Main reference: [Differential Forms and its applications](https://link.springer.com/book/10.1007/978-3-642-57951-6) + +### Differential Forms in our sweet home, $\mathbb{R}^n$ + +Let $p$ be a point in $\mathbb{R}^n$. The tangent space of $\mathbb{R}^n$ at $p$ is denoted by $T_p\mathbb{R}^n$, is the set of all vectors in $\mathbb{R}^n$ that use $p$ as origin. + +A vector field is a map that associates to each point $p$ in $\mathbb{R}^n$ a vector $v(p)$ in $T_p\mathbb{R}^n$. + +That is + +$$ +v(p)=a_1(p)e_1+...+a_n(p)e_n +$$ + +where $e_1,...,e_n$ is the standard basis of $\mathbb{R}^n$, (in fact could be anything you like) + +And $a_i(p)$ is a function that maps $\mathbb{R}^n$ to $\mathbb{R}$. + +$v$ is differentiable at $p$ if the function $a_i$ is differentiable at $p$. + +This gives a vector field $v$ on $\mathbb{R}^n$. +