Creating an Archive
The PAMMS content management system offers the ability to create an archive of the site by department at a specific date or commit. The archive contains the pages and PDFs for a single department (e.g., OFS, DFCS TANF) in the state they were in on the date specified.
Overview
The archive feature builds on the foundation used for the content preview. Like the content preview, the archive is orchestrated using a GitLab CI pipeline and initiated from a content source repository. However, in this case, it’s initiated at the request of an authorized user rather than upon creation of a merge request.
Much like the content review, the archive site only contains files from the department from which it was run. Any references outside of the department link directly to the production site.
Initiating an archive request
Start by navigating to the content repository in the pamms-sources groups for which you want to request an archive (e.g., gitlab.com/gadhs/pamms-sources/ofss).
Next, select Build > Pipelines from the repository’s navigation.
From the Pipelines page, click on the Run Pipeline button.
In the form presented, fill in a new variable named ARCHIVE_DATE and enter a date (e.g., 09/01/2025) in the field to the right.
(Note that the date may not contain spaces).
Finally, click the New Pipeline button.
Whenever a pipeline is triggered from the web form, and the ARCHIVE_DATE variable has a non-empty value, the generate-archive job will run.
Wait for the job status to turn green.
Downloading the archive
Once the pipeline is complete, any user with access to the repository can download the zip file of the generated site. To do so, either a) navigate to the Pipelines page and click the Download button on the completed entry or b) navigate to the archive job for the completed pipeline and click the Download button under the Job artifacts section.
The zip file contains both the site for offline viewing and the PDF exports and all attachments. No content in the generated site will be newer than the date entered in the New Pipeline form.
Sharing the PDFs
In the archive site, references in the PDF export to pages and attachments in the same department are relative. This strategy is necessary since the attachments are also part of the archive. That means the PDFs must be viewed in the context of the generated site. In order to ensure that, the archive of the site must be downloaded and extracted to the local filesystem. The PDFs must be viewed from there. The PDFs cannot be separated from that context (e.g., emailed independently) or else those relative references will be severed.
Browsing the archive
As an alternative to downloading the archive, you can browse it directly from the job artifacts view. On the job results page, instead of clicking on Download, click on Browse. Then, click on the site folder, then the index.html file. That will take you to the archive site. You will know it is not the production site by the cross hatching in the header.
How it works
The archive feature does not build the entire site, but rather just what is necessary to produce the PDF exports for the subject department. The site build is driven by the production playbook (antora-playbook.yml), which is modified by the content review extension to only build files in the current content source repository (using files no more recent than the archive date).